<template>
	<view class="content">
		
		<view class="rows" @tap="inDetails">
			<image class="cover" :src="data.cover" mode=""></image>
			<view class="centerBox">
				<view class="name overflow_one">{{data.name}}</view>
				<view class="clearBoth"></view>
				<view class="rule fontSize12">{{data.rule}}</view>
				<view class="price fontSemiBold">¥ {{data.price}}</view>
			</view>
			<view class="clearBoth"></view>
			<view class="thisTitle">券码信息</view>
			<view class="numbers" :class=" data.type == 2 ?'color_gray':'' ">{{data.ticketNunber}}</view>
			<view class="status" v-show="data.type == 0">未使用</view>
			<view class="status" v-show="data.type == 1">制作中</view>
			<view class="status color_gray" v-show="data.type == 2">已使用</view>
			<view class="clearBoth"></view>
		</view>
		
		<view class="dataBox bgIsWhite">
			<view class="dataRows" style="margin-bottom: 20upx;">
				<view class="left fontSize13">订单编号</view>
				<view class="rights">
					<view class="priceNames fontSize15 fontSemiBold">{{data.orderNUmber}}</view>
				</view>
				<view class="clearBoth"></view>
			</view>
			<view class="dataRows" style="margin-bottom: 20upx;">
				<view class="left fontSize13">下单时间</view>
				<view class="rights">
					<view class="priceNames fontSize15 fontSemiBold">{{data.ordertime}}</view>
				</view>
				<view class="clearBoth"></view>
			</view>
			<view class="dataRows" style="margin-bottom: 20upx;">
				<view class="left fontSize13">付款时间</view>
				<view class="rights">
					<view class="priceNames fontSize15 fontSemiBold">{{data.payTime}}</view>
				</view>
				<view class="clearBoth"></view>
			</view>
			<view class="dataRows" style="margin-bottom: 20upx;">
				<view class="left fontSize13">数量</view>
				<view class="rights">
					<view class="priceNames fontSize15 fontSemiBold">{{data.number}}</view>
				</view>
				<view class="clearBoth"></view>
			</view>
			<view class="dataRows" style="实付金额: 20upx;">
				<view class="left fontSize13">付款金额</view>
				<view class="rights">
					<view class="priceNames fontSize15 fontSemiBold">¥ {{data.money}}</view>
				</view>
				<view class="clearBoth"></view>
			</view>
		</view>
		
		<view class="btnTips" @tap="inDetails">再来一单</view>
		

		
		
	</view>
</template>
<style>
	.content{width: 100%;min-height: 100vh;background: rgb(245,245,249);padding-top: 2upx;}
	.content .rows{width:90%;margin-left: 5%;padding:5%;border-radius: 20upx;background: white;margin-top: 40upx;}
	.content .rows .cover{width: 120upx;height:120upx;border-radius: 6upx;float: left;}
	.content .rows .centerBox{width: 70%;float: left;margin:0 5%}
	.content .rows .centerBox .name{width: 100%;font-size: 32upx;color:#262626;font-weight: bold;float: left;}
	.content .rows .centerBox .rule{color:#262626;margin-top: 0upx;margin:4upx 0 10upx}
	.content .rows .thisTitle{font-size: 32upx;color:#333333;font-weight: bold;margin:40upx 0 10upx 0}
	.content .rows .numbers{height:60upx;line-height: 60upx;font-size: 44upx;color:#333333;font-weight: bold;float: left;}
	.content .rows .status{height:60upx;line-height: 60upx;font-size: 26upx;color:#333333;float: right;}
	.content .bgIsWhite{background: white;border-radius: 10upx;padding:5%;}
	.content .dataBox{width: 90%;margin-left: 5%;margin-top: 40upx;}
	.content .dataBox .topBox{width: 100%;display: flex;justify-content: left;}
	.content .dataBox .topBox .logo{width: 44upx;height: 44upx;}
	.content .dataBox .topBox .names{max-width:60%;height: 44upx;line-height: 44upx;margin:0 10upx 0 20upx;font-size: 30upx;font-weight: bold;color:#010101;}
	.content .dataBox .topBox .icons{margin-top:8upx;}
	.content .dataBox .goodsImage{width:180upx;height: 180upx;border-radius: 10upx;float: left;margin-right: 5%;margin-top: 40upx;}
	.content .dataBox .goodsRight{width: 65%;height:180upx;float: left;margin-top: 40upx;}
	.content .dataBox .goodsRight .goodsName{}
	.content .dataBox .goodsRight .ruleBox{color:#999999;float: left;margin:20upx 0 40upx 0}
	.content .dataBox .goodsRight .priceBox{width: 100%;height:70upx;line-height: 70upx;}
	.content .dataBox .goodsRight .priceBox .price{color:#262626;font-size: 40upx;float: left;}
	.content .dataBox .goodsRight .priceBox .buyNumber{color:#000000;font-weight: bold;float: right;}
	.content .dataBox .dataRows{width: 100%;}
	.content .dataBox .isMargin{margin:30upx 0;margin-top: 50upx;}
	.content .dataBox .isBold{font-weight: bold;}
	.content .dataBox .dataRows .left{width: 30%;float: left;height:40upx;line-height: 40upx;}
	.content .dataBox .dataRows .rights{width: 70%;float: right;}
	.content .dataBox .dataRows .rights .names{width: 80%;color:#BBBBBB;float: left;text-align: right;}
	.content .dataBox .dataRows .rights .priceNames{width:100%;height:40upx;line-height: 40upx;color:#262626;float: left;text-align: right;}
	.content .dataBox .dataRows .rights .icons{color:#BBBBBB;float: right;}
	.content .dataBox .dataRows .thirdLeft{width: 30%;float: left;margin-top: 20upx;}
	.content .dataBox .dataRows .seventhRight{width: 70%;float: left;margin-top: 20upx;}
	.content .dataBox .dataRows .rights .thisInput{width:100%;text-align: left;}
	.content .dataBox .numberAndMoney{width: 100%;text-align: right;margin-top:20upx;}
	.content .dataBox .numberAndMoney .left{height:64upx;line-height:64upx;float:right;font-size: 26upx;color:#999999;}
	.content .dataBox .numberAndMoney .center{height:64upx;line-height:64upx;float:right;font-size: 26upx;margin:0 20upx}
	.content .dataBox .numberAndMoney .rightA{height:64upx;line-height:64upx;float:right;font-size:36upx;font-family:'Bahnschrift-SemiBold'}
	.content .btnTips{width: 90%;margin-left: 5%;padding:25upx 0;color:white;border-radius: 100upx;background: #DC582A;text-align: center;margin-top:40upx;position: fixed;bottom:5%}
	.content .color_gray{color:#BBBBBB !important}
</style>
<script>
	import Share from '@/common/wx_share.js'
	export default {
		data() {
			return {
				share:{
					title:"",
					path:'/pages/tabbar/index',
					imageUrl:'',
					desc:'',
					content:''
				},
				data:{
					id:"",
					type:"",
					cover:"",
					name:"",
					rule:"",
					price:"",
					ticketNunber:"",
					orderNUmber:"",
					ordertime:"",
					payTime:"",
					number:"",
					money:"",
					machine_code:"",
					model_id:"",
					goods_id:"",
				},

			}
		},
		onLoad(e){
			this.AjaxLoad(e.id)
		},
		methods: {
			AjaxLoad(e){
				let param={
					token:this._$userToken("userInfo").token,
					id:e
				};
				this._$InitRequest.request("Coffee_order/info", param).then(res => {
					
					this.data.id = res.data.goods.id
					this.data.type = res.data.status
					this.data.cover = res.data.goods.thumb_url
					this.data.name = res.data.goods.goods_name
					this.data.rule = res.data.goods.goods_attr_str
					this.data.price = res.data.goods.price
					this.data.ticketNunber = res.data.brewing
					this.data.orderNUmber = res.data.goods.order_goods_no
					this.data.ordertime = res.data.addtime
					this.data.payTime = res.data.pay_time
					this.data.number = 1
					this.data.money = res.data.goods.price
					
					this.data.machine_code = res.data.machine_code
					this.data.model_id = res.data.model_id
					this.data.goods_id = res.data.goods_id
					
				},error=>{})
			},
			inDetails(id){
				uni.navigateTo({
					url:"/pages_kafei/pages/details/details??goods_id=" + this.data.goods_id + "&machineCode=" + this.data.machine_code + "&model_id=" +  this.data.model_id
				})
			},

			
			
			
			
			
			
			
		}
	}
</script>
<style lang="scss" scoped>
/deep/ .uni-input-input {font-size:32upx}
/deep/ .uni-radio-input-checked{background-color:rgb(110,43,34) !important;border:2upx solid white !important}
.content .html{
  ::v-deep {
    img {
      width: 100%;
    }
  }
}
</style>